%数据
x=0.15:0.01:0.38;%腿长变化
y=[0.065841,0.066029,0.066622,0.067486,0.068744,0.069884,0.071421,0.072846,0.074419,0.076296,0.078105,0.079962,0.081581,0.083606,0.085976,0.087853,0.090290,0.092224,0.094418,0.096806,0.099115,0.101679,0.104235,0.106415];

%驱动轮质心到左右腿部质心距离变化

%拟合
p=polyfit(x,y,3)
y_fit=polyval(p,x);
plot(x,y,'o');
hold on;
plot(x,y_fit,'_');
hold off;
legend('原始数据','拟合数据');
title('多项拟合式');
xlabel('x');
xlabel('y');



